cc.Class({
    extends: cc.Component,
    properties: {
        prefabAdCrossList: cc.Prefab
    },
    onLoad: function () {
        tywx.NotificationCenter.listen(tywx.EventType.MSG_SHOW_ADCROSSLIST_POPUP, this.showAdCrossListPopup.bind(this), this);
    },
    start: function () {
        this.adCrossList_popup || (this.adCrossList_popup = this._getAdCrossListPopup());
    },
    showAdCrossListPopup: function () {
        if (tywx.IsWechatPlatform()) {
            if (this.adCrossList_popup) this.adCrossList_popup.getComponent("AdCrossList_popupScript").show(); else this.adCrossList_popup = this._getAdCrossListPopup(),
                this.adCrossList_popup.getComponent("AdCrossList_popupScript").show();
            tywx.NotificationCenter.trigger(tywx.EventType.MSG_SHOW_GAME_INTERACTION, !1);
        }
    },
    _getAdCrossListPopup: function () {
        var e = cc.instantiate(this.prefabAdCrossList);
        cc.game.addPersistRootNode(e);
        var t = cc.winSize.width;
        return e.width = t, e;
    }
})